# Django settings for music_festivals project.

# Import local installation settings
from local_settings import * #IGNORE:W0614

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = PROJECT_BASEPATH + 'media'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
    
    # Middleware that locks down an entire site, requiring the user to login
    # to view any page. Great for development/beta-testing.
    'util.middleware.RequireLoginMiddleware.RequireLoginMiddleware',

    # Tie transactions to HTTP requests - uber cool :)
    #
    # It works like this: When a request starts, Django starts a transaction.
    # If the response is produced without problems, Django commits any pending
    # transactions. If the view function produces an exception, Django rolls
    # back any pending transactions.
    'django.middleware.transaction.TransactionMiddleware',
)

ROOT_URLCONF = 'music_festivals.urls'

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    PROJECT_BASEPATH + 'templates',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.admin',
    'festivals',
)
